package learn_concurrent._1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class T18 {
	final static Logger logger = LoggerFactory.getLogger(T18.class);

	public static void main(String[] args) {
		Thread t = new Thread(() -> {
			while(true) {
				if(Thread.currentThread().isInterrupted()) {
					break;
				}
			}
			logger.debug("end");
		});
		t.setDaemon(true);
		t.start();
		
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		logger.debug("end");
		
	}

}
